<template>
  <div>
    <div v-for="(item, index) of categoryList" :key="index">
      <div class="list-item-title border-bottom">
        <span class="item-title-icon"></span>
        {{ item.title }}
      </div>
      <div v-if="item.children" class="item-children">
        <detail-list :category-list="item.children"></detail-list>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "DetailList",
  props: {
    categoryList: Array
  }
};
</script>

<style lang="stylus" scoped>
.list-item-title {
  width: 100%;
  height: .8rem;
  line-height: .8rem;
  font-size: .32rem;
  text-indent: .4rem;
  position: relative;
}

.item-title-icon {
  display: inline-block;
  background-image: linear-gradient(126deg,#00e0ca 0,#00bfd4 100%);
  border-radius: .06rem;
  height: .24rem;
  min-width: .08rem;
  margin-right: .12rem;
}

.item-children{
  padding: 0 .3rem;
}

.item-children .list-item-title {
  font-size: .28rem;
}
</style>
